package com.njwb.day11.reflection2;

public class TestCopy {
    public static void main(String[] args) throws Exception {
        Person p = new Person("张三", 20, "南京");
        Person p2 = BeanUtil.copy(p);

        System.out.println("原对象：" + p + " 地址：" + System.identityHashCode(p));
        System.out.println("复制对象：" + p2 + " 地址：" + System.identityHashCode(p2));
        System.out.println("名字是否一致: " + p.getName().equals(p2.getName()));
    }
}
